Skip to content

Wizard: Fix password validation ignoring Azure character rules - #4729

Merged
regexowl merged 1 commit into
osbuild:mainfrom
mgold1234:new_length
Aug 14, 2026
Merged

Wizard: Fix password validation ignoring Azure character rules#4729
regexowl merged 1 commit into
osbuild:mainfrom
mgold1234:new_length

Conversation

@mgold1234

Copy link
Copy Markdown
Collaborator

The isValid check only verified password length, ignoring the
requirement for at least 3 character types (lowercase, uppercase,
numbers, symbols) when Azure is selected as a target.

@codecov

codecov Bot commented Aug 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.92%. Comparing base (4ec9568) to head (8fa9085).

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4729      +/-   ##
==========================================
+ Coverage   72.90%   77.92%   +5.01%     
==========================================
  Files         261      264       +3     
  Lines        7043     7072      +29     
  Branches     2596     2599       +3     
==========================================
+ Hits         5135     5511     +376     
+ Misses       1880     1460     -420     
- Partials       28      101      +73     
Flag Coverage Δ
playwright 60.06% <75.00%> (?)
vitest 72.92% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ents/CreateImageWizard/utilities/useValidation.tsx 88.79% <100.00%> (+2.66%) ⬆️

... and 74 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4ec9568...8fa9085. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • The new Azure-specific isValid condition (isLengthValid && (!isAzure || rulesCount >= 3)) is quite compact; consider extracting the rulesCount >= 3 requirement into a named constant or helper to make the Azure password policy more explicit and reusable.
  • Most of the changes outside checkPasswordValidity are union-type formatting adjustments; you may want to split these stylistic updates into a separate PR to keep this one focused on the Azure password validation fix.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The new Azure-specific `isValid` condition (`isLengthValid && (!isAzure || rulesCount >= 3)`) is quite compact; consider extracting the `rulesCount >= 3` requirement into a named constant or helper to make the Azure password policy more explicit and reusable.
- Most of the changes outside `checkPasswordValidity` are union-type formatting adjustments; you may want to split these stylistic updates into a separate PR to keep this one focused on the Azure password validation fix.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

  The isValid check only verified password length, ignoring the
  requirement for at least 3 character types (lowercase, uppercase,
  numbers, symbols) when Azure is selected as a target.

@regexowl regexowl left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great, thanks!

@regexowl
regexowl added this pull request to the merge queue Aug 14, 2026
Merged via the queue into osbuild:main with commit 999d20e Aug 14, 2026
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants